<style>
.disabled {
	color: #333;
}
.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
	color: #C8C8CD
}
.fui-cell-group .fui-cell .fui-cell-info {
	font-size: 0.85rem;
	color: #C8C8CD;
}
.fui-cell-group .fui-cell .fui-cell-icon i{
	color: #C8C8CD;
}
.fui-icon-group .fui-icon-col .cardfee{
	padding:0.2rem;
	margin:0.2rem;
	border-radius:0.2rem;
    background:#ddd;
}
.fui-icon-group .fui-icon-col.active .cardfee{
    background:#55bd47;
	color:#fff;
}
.popup .fui-cell-group .fui-cell .fui-input {
    background: #f2f2f2;
}
.jylabel-switch.active {
    border-radius: 1.5rem;
    background-color: #fc6d60;
    color: #fff;
}
</style>
<div class='fui-page fui-page-current'>
	<div class='fui-content member-page'>
			<div style="margin:0.5rem;">
					<div class="memlogo-area" style="background: #55bd47;">
						<div class="memlogo">
							<img ng-src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/gw-user.png'}}">
						</div>
						<div class="name">{{pagedata.member.nickname || '匿名'}}</div>
						<br>
						<div class="name">{{pagedata.member.mobile || '无手机号'}}</div>
						<div class="code">
							<div class="jylabel jylabel-info" href="javascript:;" ng-click="pagedata.showtixian=true" style="border: 1px solid #fff;color:#fff;">提现</div>
						</div>
						<div class="bot">
							<div class="jy-2">
							<h5 href="javascript:;">现有的【{{pagedata.typetitle || '金币'}}】</h5>
							<h2 style="margin-top:0">{{pagedata.allmoney || '0.00'}} </h2>
							</div>
							<div class="jy-2">
							<h5 href="javascript:;">现有的【能量值增值】</h5>
							<h2 style="margin-top:0">{{pagedata.member.nengfee || '0.00'}} </h2>
							</div>
						</div>
					</div>
			</div>
			<div style="padding:0 0.5rem">
			<div class="fui-tab fui-tab-danger" id="tab" style="top:0.5rem">
				<a ng-class="{'external active':pagedata.params.feetype == '0'}" href="javascript:" ng-click="pagedata.params.feetype='0';tool.get_list('jy_merch/member.credit_log/list/',true);">能量值明细</a>
				<a ng-class="{'external active':pagedata.params.feetype == '1'}" href="javascript:" ng-click="pagedata.params.feetype='1';tool.get_list('jy_merch3fee/member.xunibi/list/',true);">增值明细</a>
			</div>
			<div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0">
				<i class='fa fa-comment-o'></i><br/>暂时没有任何记录!
			</div>
			<div class='fui-list-group container' ng-show="pagedata.list.length>0" >
				<div class="fui-list goods-item" ng-repeat="item in pagedata.list">
					<div class="fui-list-media">
						<img ng-if="item.member.avatar" ng-src="{{tomedia(item.member.avatar)}}" class="round" style="width:2rem;height:2rem">
						<i ng-if="!item.member.avatar" class="icon icon-my2"></i>
					</div>
					<div class="fui-list-inner">
						<div class='title'>
							<span ng-show="item.is_add==1" class="label label-success">{{item.is_addtitle}}</span>
							<span ng-show="item.is_add!=1" class="label label-danger">{{item.is_addtitle}}</span>
							<span class="red" style="margin-left:0.3rem">{{pagedata.typetitle}}：{{item.fee}}</span>
							<span class="gray" style="font-size:0.6rem;"> 个</span>
						</div>
						<div class='gray'>{{item.createtime}}</div>
					</div>
					<div class='fui-list-angle' style="width:4rem">
						<span class='fui-label fui-label-default gray' style="background:#f2f2f2;border-radius:0.2rem;">{{item.remark || item.typetitle}}</span>
					</div>
				</div>
			</div>
			</div>
	</div>
</div>
<div ng-if="pagedata.showtixian" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fff">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showtixian=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;max-height:21rem;overflow-y:scroll">
				<div class='fui-cell-title c bold'>您正在进行【能量值提现】操作</div>
				<div class='fui-cell'>
					<div class='fui-cell-label' style='width:auto;'>选择提现种类</div>
					<div class='fui-cell-info'>
						<div class="jylabel jylabel-switch-label">
								<span ng-class="{'jylabel-switch':1,'active':pagedata.post.feetype!=1}" ng-click="pagedata.post.feetype=0;">能量值</span>
								<span ng-class="{'jylabel-switch':1,'active':pagedata.post.feetype==1}" ng-click="pagedata.post.feetype=1;">能量增值</span>
						</div>
					</div>
				</div>
				<div class="gray c" ng-if="pagedata.pluginset.balance_money>0">提现额度最小为: <span class='text-danger'>￥{{pagedata.pluginset.balance_money}}</span></div>
				<div class='fui-cell' ng-if="pagedata.post.feetype!=1">
					<div class='fui-cell-label' style='width:auto;'>当前可提现能量值：</div>
					<div class='fui-cell-info'>{{pagedata.allmoney}}</div>
				</div>
				<div class='fui-cell' ng-if="pagedata.post.feetype==1">
					<div class='fui-cell-label' style='width:auto;'>当前可提现能量增值：</div>
					<div class='fui-cell-info'>{{pagedata.member.nengfee}}</div>
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label' style='width:auto;'>提现能量值数量：</div>
					<div class='fui-cell-info'>
					<input type="number"class='fui-input' ng-blur="pagedata.refresh()" ng-model="pagedata.post.fee" value="{{pagedata.post.fee}}"/>
					</div>
				</div>
				<div class="fui-cell">
						<div class="fui-cell-label" style="width: 5rem;"><span class="re-g">提现方式</span></div>
						<div class="fui-cell-info">
							<select id="applytype" ng-model="pagedata.post.type">
								<option ng-repeat="(k,title) in pagedata.pay_types" value="{{k}}" ng-selected="pagedata.post.type==k">{{title}}</option>
							</select>
						</div>
						<div class="fui-cell-remark"></div>
					</div>
					<div ng-if="pagedata.post.type =='1' || pagedata.post.type =='2'" class="fui-cell ab-group">
						<div class="fui-cell-label" style="width: 5rem;">真实姓名</div>
						<div class="fui-cell-info"><input type="text" id="realname" name="realname" ng-model="pagedata.post.realname" class='fui-input' value="{{pagedata.post.realname}}" max="25"/></div>
					</div>
					<div ng-if="pagedata.post.type =='1'" class="fui-cell alipay-group">
						<div class="fui-cell-label" style="width: 5rem;">支付宝帐号</div>
						<div class="fui-cell-info">
						<input type="text" id="alipay" name="alipay" class='fui-input' ng-model="pagedata.post.alipay" value="{{pagedata.post.alipay}}" max="25"/>
						</div>
					</div>
					<div ng-if="pagedata.post.type =='1'" class="fui-cell alipay-group">
							<div class="fui-cell-label" style="width: 5rem;">确认帐号</div>
							<div class="fui-cell-info"><input type="text" id="alipay1" ng-model="pagedata.post.alipay1" name="alipay1" class='fui-input' value="{{pagedata.post.alipay1}}" max="25"/></div>
					</div>
					<div ng-if="pagedata.post.type =='2'" class="fui-cell bank-group" >
							<div class="fui-cell-label" style="width: 5rem;">所属银行</div>
							<div class="fui-cell-info">
								<input type="text" name="bankname" class='fui-input' ng-model="pagedata.post.bankname" value="{{pagedata.post.bankname}}"/>
							</div>
					</div>
					<div ng-if="pagedata.post.type =='2'" class="fui-cell bank-group">
							<div class="fui-cell-label" style="width: 5rem;">银行卡号</div>
							<div class="fui-cell-info"><input type="text" id="bankcard" name="bankcard" class='fui-input' ng-model="pagedata.post.bankcard" value="{{pagedata.post.bankcard}}" max="25"/></div>
					</div>
					<div ng-if="pagedata.post.type =='2'" class="fui-cell bank-group">
							<div class="fui-cell-label" style="width: 5rem;">确认卡号</div>
							<div class="fui-cell-info"><input type="text" id="bankcard1" name="bankcard1" class='fui-input' ng-model="pagedata.post.bankcard1" value="{{pagedata.post.bankcard1}}" max="25"/></div>
					</div>
					<div ng-if="pagedata.post.type!='credit'" class='fui-cell-title disabled'>提现手续费为 <text class='text-danger'> {{pagedata.pluginset.balance_per || 0}}</text>%</div>
					<div ng-if="pagedata.post.type!='credit'" class='fui-cell-title charge-group disabled' style="padding-top:0">本次提现将扣除手续费 ￥<text class='text-danger'> {{pagedata.data.service_money || '0.00'}}</text>
					</div>
					<div ng-if="pagedata.post.type!='credit'" class='fui-cell-title charge-group disabled' style="padding-top:0">本次提现实际到账金额 ￥<text class='text-danger'> {{pagedata.data.cash_money || '0.00'}}</text>
					</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fc6d60;" ng-click="post(pagedata.post,'/member.xunibi/tixian/')">确认提现</a>
			</div>
		</div>
	</div>
</div>
<script>
if(scope.pagedata.params.feetype == '1'){
	scope.tool.get_list('jy_merch3fee/member.xunibi/list/',true);
}else{
	scope.tool.get_list('jy_merch/member.credit_log/list/',true);
}
scope.pagedata.scroll_bottom=function(){
	if(scope.pagedata.params.feetype == '1'){
		scope.tool.get_list('jy_merch3fee/member.xunibi/list/');
	}else{
		scope.tool.get_list('jy_merch/member.credit_log/list/');
	}
}
scope.pagedata.refresh=function(){
	scope.pagedata.data.service_money=(scope.pagedata.post.fee*scope.pagedata.data.balance_per/100).toFixed(2);
	scope.pagedata.data.cash_money=(scope.pagedata.post.fee-scope.pagedata.data.service_money).toFixed(2);
}
</script>